package ru.ipo.dces.plugins.admin.beans;

import ru.ipo.dces.clientservercommunication.PluginSide;

public class PluginState {

    private String pluginAlias;
    private PluginSide pluginSide;
    private String pluginDescription;

    private boolean availableOnServer = false;
    private boolean availableInUpdates = false;
    private boolean availableInDownloads = false;

    public void setAlias(String alias) {
        pluginAlias = alias;
    }

    public String getAlias() {
        return pluginAlias;
    }

    public PluginSide getPluginSide() {
        return pluginSide;
    }

    public void setPluginSide(PluginSide type) {
        pluginSide = type;
    }

    public void setDescription(String description) {
        pluginDescription = description;
    }

    public String getDescription() {
        if (pluginDescription == null)
            return "";
        return pluginDescription;
    }

    public boolean isAvailableOnServer() {
        return availableOnServer;
    }

    public boolean isAvailableInUpdates() {
        return availableInUpdates;
    }

    public boolean isAvailableInDownloads() {
        return availableInDownloads;
    }

    public void setAvailableOnServer(boolean value) {
        availableOnServer = value;
    }

    public void setAvailableInUpdates(boolean value) {
        availableInUpdates = value;
    }

    public void setAvailableInDownloads(boolean value) {
        availableInDownloads = value;
    }
}
